<script>
	import {
		mapMutations,
		mapState
	} from 'vuex';
	import url_config from "@/common/config.js";
	export default {
		onLaunch: function() {
			if (uni.getStorageSync("uuid")) {
				uni.switchTab({
					url: "/pages/index/index"
				});
			}
		},
		onMounted: function() {
		},
		methods: {
			notice(obj) {
				const userId = uni.getStorageSync('rawData').userId;
				uni.request({
					url: `https://device.jpush.cn/v3/devices/${obj.registrationID}`,
					method: 'POST',
					header: {
						"Authorization": `Basic NzRlNDczN2EzOTMzNzEyMzU5MTI4Njc1OmRiZDZjZWEzOGU4NzA3NzgwNGZkMzM2NA==`,
						"Content-Type": "application/json; charset=utf-8"
					},
					data: {
						alias: "JG_" + userId,
						mobile: ""
					},
					success: res => {
						//console.log('---推送成功----', JSON.stringify(res))
					}
				})
			}
		}
	};
</script>

<style lang="scss">
	@import "uview-ui/index.scss";

	/* 解决头条小程序组件内引入字体不生效的问题 */
	/* #ifdef MP-TOUTIAO */
	@font-face {
		font-family: uniicons;
		src: url('/static/uni.ttf');
	}

	/* #endif */
	@import "uview-ui/index.scss";
	@import "static/css/reset.css";

	body,
	ul,
	li,
	ol,
	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	p,
	input,
	select,
	textarea,
	dl,
	dd {
		margin: 0;
		padding: 0;
	}

	ul,
	ol {
		list-style: none;
	}

	input,
	select,
	textarea {
		background-color: transparent;
		border: none;
		outline: none;
	}

	textarea {
		resize: none;
	}

	/*右下角的小尾巴*/
	img {
		border: none;
		vertical-align: top;
	}

	a {
		text-decoration: none;
	}

	.clearfix:after,
	.clearfix:before {
		content: "";
		display: table;
	}

	.clearfix:after {
		clear: both;
	}

	/*公用样式*/
	.gWidth {
		width: 1140px;
		margin-left: auto;
		margin-right: auto;
	}

	.fl {
		float: left;
	}

	.fr {
		float: right;
	}

	.norm-single-li {
		// 表单中单排的上下左右通用css边距与布局
		display: flex;
		align-items: center;
		justify-content: space-between;
		// padding: 32rpx 0;
		// margin: 0 32rpx;
		min-height: 84rpx;
		padding: 16rpx 0;

		input {
			text-align: right;
			color: #909399;
			font-size: 14px;
			width: 448rpx;
			text-align: right;
			height: 84rpx;
		}
	}

	.important {
		color: red !important;
	}
</style>